/*******************************************************************************
 * Copyright (c) 2010 Maciej Kaniewski (mk@firegnom.com).
 * 
 *    This program is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation; either version 3 of the License, or
 *    (at your option) any later version.
 * 
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 * 
 *    You should have received a copy of the GNU General Public License
 *    along with this program; if not, write to the Free Software Foundation,
 *    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 * 
 *    Contributors:
 *     Maciej Kaniewski (mk@firegnom.com) - initial API and implementation
 ******************************************************************************/
package com.firegnom.valkyrie.view;

import android.content.Context;
import android.graphics.Canvas;
import android.view.View;

import com.firegnom.valkyrie.engine.GameController;

// TODO: Auto-generated Javadoc
/**
 * The Class GameView.
 */
public class GameView extends View {

	/**
	 * Instantiates a new game view.
	 *
	 * @param context the context
	 */
	public GameView(Context context) {
		super(context);
	}

	/* (non-Javadoc)
	 * @see android.view.View#onDraw(android.graphics.Canvas)
	 */
	@Override
	protected void onDraw(Canvas canvas) {
		GameController.getInstance().doDraw(canvas);

	}

	/* (non-Javadoc)
	 * @see android.view.View#onSizeChanged(int, int, int, int)
	 */
	@Override
	protected void onSizeChanged(int w, int h, int oldw, int oldh) {
		GameController.getInstance().setScreenSize(w, h);
	}

	// @Override
	// protected boolean verifyDrawable(Drawable dr) {
	// if (GameActivity.sc ==null) return false;
	// return sc.verifyDrawable(dr);
	// }

}
